/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.munchkinquest.utils;

import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 *
 * @author stephen
 */
public class SpecialSteps {

    private static ResourceBundle rb = ResourceBundle.getBundle("com.munchkinquest.specialsteps");

    public static Long getSpecialStep(String property) {
        String value = "";
        try {
            value = rb.getString(property);
            return Long.parseLong(value);
        } catch (NullPointerException e) {
            StringUtils.throwMessage("Missing property name");
        } catch (MissingResourceException e) {
            StringUtils.throwMessage("Could not find property '" + property + "' in specialsteps.properties");
        } catch (ClassCastException e) {
            StringUtils.throwMessage(e.getMessage());
        } catch (NumberFormatException e) {
            StringUtils.throwMessage("Property value '" + value + "' is not a Long type");
        }
        return 0L;
    }
;
}
